<!-- edu_15_3_2.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>鼠标移动事件</title>
    <script type="text/javascript">
      function $(id) {
        return document.getElementById(id);
      }
      function mouseOver() {
        $("b1").src = "eg_mouse1.jpg";
      }
      function mouseOut() {
        $("b1").src = "eg_mouse2.jpg";
      }
    </script>
    <style type="text/css">
      p,
      h4 {
        text-align: center;
      }
    </style>
  </head>

  <body>
    <h4>鼠标事件</h4>
    <hr color="blue" />
    <p>
      <img
        alt="鼠标移动事件"
        src="eg_mouse2.jpg"
        id="b1"
        onmouseover="mouseOver()"
        onmouseout="mouseOut()"
      />
    </p>
  </body>
</html>
